package com.corona.game;

import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Texture;
import com.corona.Game;

/* compiled from: Battle.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/VolcaronaParticleEffect1.class */
class VolcaronaParticleEffect1 extends Action {
    Pixmap pixmap;
    Texture texture;
    public Action.Layer layer = Action.Layer.gui_0;
    int timer = 0;
    int[] offsets = {0, 0, 0, 0};
    Texture[] textures = new Texture[4];
    int oneFourth = 1;

    public VolcaronaParticleEffect1(Action nextAction) {
        super(new Object[0]);
        this.nextAction = nextAction;
    }

    @Override // com.corona.game.Action
    public String getCamera() {
        return "gui";
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.Action
    public void firstStep(Game game) {
        this.pixmap = Pixmap.createFromFrameBuffer(0, 0, 160, 144);
        for (int i = 0; i < 4; i++) {
            this.textures[i] = new Texture(this.pixmap.getWidth(), this.pixmap.getHeight(), Pixmap.Format.RGBA8888);
        }
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        if (this.timer == 0) {
            game.uiBatch.flush();
            this.pixmap = Pixmap.createFromFrameBuffer(0, 0, 160, 144);
            this.oneFourth = this.pixmap.getHeight() / 4;
            for (int i = 0; i < 4; i++) {
                this.textures[i].draw(this.pixmap, 0, 0 - (this.oneFourth * i));
            }
        }
        for (int i2 = 0; i2 < 4; i2++) {
            game.uiBatch.draw(this.textures[i2], 0.0f, 20.0f);
        }
        this.timer++;
        if (this.timer > 60) {
            this.timer = 0;
        }
    }
}
